package com.ufox.controller;


import com.ufox.entity.Areas;
import com.ufox.entity.Result;
import com.ufox.service.IAreasService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 优狐科技-www.hbufox.com
 * @since 2022-06-09
 */
@RestController
@RequestMapping("/areas")
public class AreasController {

    @Autowired
    private IAreasService iAreasService;


    @GetMapping("/{id}")
    protected Result selectById(@PathVariable Integer id) {
       List<Areas> list = iAreasService.findById(id);
        return Result.ok(list);
    }
}

